<!DOCTYPE html>
<html>
<head>
    {include file="layout:_meta_home" /}
    <link rel="stylesheet" href="__static__/layui/css/layui.css" media="all">
    <link rel="stylesheet" href="__static__/admin/css/console.css" media="all">
</head>
<body>
<div class="layui-fluid">
    <div class="layui-col-sm12">
        <div class="layui-card">
            <div class="layui-card-header">
                团队概览
            </div>
            <div class="layui-card-body">
                <table id="listTable" lay-filter="listTable"></table>
            </div>
        </div>
    </div>
    <div class="layui-row layui-col-space15">
        <div class="layui-col-sm6 layui-col-md4">
            <div class="layui-card">
                <div class="layui-card-header">店铺统计</div>
                <div class="layui-card-body layuiadmin-card-list">
                    <table id="listTable1" ></table>
                </div>
            </div>
        </div>
        <div class="layui-col-sm6 layui-col-md4">
            <div class="layui-card">
                <div class="layui-card-header">充值提款统计</div>
                <div class="layui-card-body layuiadmin-card-list">
                    <table class="layui-table" id="listTable2" ></table>
                </div>
            </div>
        </div>
        <div class="layui-col-sm6 layui-col-md4">
            <div class="layui-card">
                <div class="layui-card-header">人数款项统计</div>
                <div class="layui-card-body layuiadmin-card-list">
                    <table class="layui-table" id="listTable3" ></table>
                </div>
            </div>
        </div>

    </div>
</div>
</div>
{include file="layout:_footer" /}
<style>
/* 表格背景颜色 */
.layui-table tbody tr:hover, .layui-table thead tr,
.layui-table-click, .layui-table-header, .layui-table-hover, .layui-table-mend,
.layui-table-patch, .layui-table-tool, .layui-table-total, .layui-table-total tr,
.layui-table[lay-even] tr:nth-child(even) {
    background-color: #fff;
}

/* 表格边框颜色 */
.layui-table td, .layui-table th, .layui-table-col-set, .layui-table-fixed-r,
.layui-table-grid-down, .layui-table-header, .layui-table-page, .layui-table-tips-main,
.layui-table-tool, .layui-table-total, .layui-table-view, .layui-table[lay-skin=line], .layui-table[lay-skin=row] {
    border-color: #fff;
    border-bottom-color: #eee;
}
</style>
<script>
    layui.use(['layer','table', 'carousel', 'echarts','echartsTheme','laydate'], function () {
        var $ = layui.$
            ,echarts = layui.echarts
            ,laydate = layui.laydate
            ,table = layui.table;

        laydate.render({elem: '#group_time',type: 'datetime',range: true});

        //团队概览
        table.render({
            elem: '#listTable',
            url : '{:url("index/console")}',
            totalRow: true,
            cols : [[
                {field: 'group_info', title: '组别', align:'center',minWidth:160, totalRowText: '合计'},
                {field: 'invite_code', title: '推荐码', align:'center',minWidth:80},
                {field: 'recharge_amount', title: '充值总金额', align:'center',minWidth:90,totalRow: true},
                {field: 'withdraw_amount', title: '提现总金额', align:'center',minWidth:90,totalRow: true},
                {field: 'in_amount', title: '盈亏', align:'center',minWidth:90,totalRow: true},
                {field: 'recharge_num', title: '总充值人数', align:'center',minWidth:100,totalRow: true},
                {field: 'withdraw_order', title: '总提现笔数', align:'center',minWidth:100,totalRow: true},
                {field: 'register_num', title: '注册总人数', align:'center',minWidth:100,totalRow: true},
                {field: 'shop_num', title: '总租用店铺', align:'center',minWidth:90,totalRow: true},
                {field: 'day_recharge_order', title: '今日充值笔数', align:'center',minWidth:90,totalRow: true},
            ]],
            page: false, //是否显示分页
        });

        //店铺统计
        table.render({
            elem: '#listTable1',
            url : '{:url("index/shop")}',
            totalRow: true,
            cols : [[
                {field: 'title', title: '等级名称', align:'center',minWidth:130, totalRowText: '合计'},
                {field: 'level', title: '等级', align:'center',minWidth:180},
                {field: 'shop_num', title: '今日租用数量', align:'center',minWidth:300,totalRow: true},
            ]],
            page: false, //是否显示分页
        });

        table.render({
            elem: '#listTable2',
            url : '{:url("index/amount")}',
            cols : [[
                {field: 'title', title: '项目', align:'center',minWidth:130},
                {field: 'amount', title: '数额', align:'center',minWidth:80},
            ]],
            page: false, //是否显示分页
        });

        table.render({
            elem: '#listTable3',
            url : '{:url("index/num")}',
            cols : [[
                {field: 'title', title: '项目', align:'center',minWidth:130},
                {field: 'amount', title: '数额', align:'center',minWidth:80},
            ]],
            page: false, //是否显示分页
        });
    });
</script>
</body>
</html>